ICON = images/appicon.icns
QT += network \
- xml \
- webkit \
+ xml \
+ webkit
+
+greaterThan(QT_MAJOR_VERSION, 4) {
+ QT += widgets \
+ webkitwidgets
+}
unix:DESTDIR = objects
unix:MOC_DIR = objects
#include <QCoreApplication>
#include <QLibraryInfo>
#include <QIcon>
+#include <QTextCodec>
#include "mainwindow.h"
#include "gmapdlg.h"
//------------------------------------------------------------------------
int main(int argc, char**argv)
{
+#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
+ // Qt 5.0 uses QString::fromUtf8 to convert from character pointers
+ // and QBytreArrays to QStrings while previous version of Qt used
+ // QString::fromAscii. QString::fromAscii used the codec set
+ // by QTextCode::setCodecForCStrings.
+ // This makes the conversion consistent between Qt4 and Qt5.
+ QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
+#endif
+
QApplication *app;
app = new QApplication(argc, argv);
app->setWindowIcon(QIcon(":/images/appicon.png"));
#cp `ldd objects/gpsbabelfe-bin | grep libaudio |awk '{print $3}'` $DISTDIR
cp -r $QT_INSTALL_PLUGINS/imageformats $DISTDIR/plugins
-cp -r $QT_INSTALL_PLUGINS/codecs $DISTDIR/plugins
+if [ -e $QT_INSTALL_PLUGINS/codecs ]
+then
+ cp -r $QT_INSTALL_PLUGINS/codecs $DISTDIR/plugins
+else
+ echo "Warning: $QT_INSTALL_PLUGINS/codecs not found, perhaps this is normal for Qt5"
+fi
+if [ -e $QT_INSTALL_PLUGINS/platforms ]
+then
+# we need at least platforms/libqxcb.so
+ cp -r $QT_INSTALL_PLUGINS/platforms $DISTDIR/plugins
+else
+ echo "Wanring: $QT_INSTALL_PLUGINS/platforms not found, this is normal for Qt4"
+fi
cp $QT_INSTALL_TRANSLATIONS/qt_*.qm $DISTDIR/translations/
# copy the compiled translations
QHBoxLayout *horizontalLayout = new QHBoxLayout();
QCheckBox *checkBox = new QCheckBox(this);
- checkBox->setText(tr(options[k].getDescription().toAscii().data()));
+ checkBox->setText(options[k].getDescription());
horizontalLayout->addWidget(checkBox);
checkBox->setChecked(options[k].getSelected());
//checkBox->setWhatsThis(options[k].getHtml());